package com.imooc.girl;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;

@Service
public class GirlService {

    @Autowired
    private GrilRespository girlRespository;

    @Transactional
    public void insertTwo(){

        Girl girlA = new Girl();
        girlA.setBroadSize("A");
        girlRespository.save(girlA);

        Girl girlB = new Girl();
        girlB.setBroadSize("BBBB");
        girlRespository.save(girlB);
    }
}
